package org.batatasframework.web.element;

import org.batatasframework.web.HtmlRenderHelper;


public class SelectOptitem extends AbstractElementContent<String> implements SelectOption{
	private Object value;
	
	public SelectOptitem() {
		super("option");
	}

	public SelectOptitem(Object value) {
		super("option");
		this.value = value;
	}
	
	@Override
	protected void readAttribute(StringBuilder html) {
		HtmlRenderHelper.attribute(html, "value", value, true);
		super.readAttribute(html);
	}

	@Override
	public SelectOption append(Object option) {
		this.content = option.toString();
		return this;
	}

}
